package com.example.mqttdevicesimulator;

/**
 * This interface contains classes with reusable constants.
 */
public interface UtilConstants {
    class OtherConstants {
        private OtherConstants() {
        }

        /**
         * MQTT Client ID.
         */
        private static String mqttClientId;

        public static String getMqttClientId() {
            return mqttClientId;
        }

        public static void setMqttClientId(final String mClientId) {
            OtherConstants.mqttClientId = mClientId;
        }
    }


    class DeviceFullName {
        private DeviceFullName() {
        }

        /**
         * Full name for light device.
         */
        static final String LIGHT = "Light";

        /**
         * Full name for TV device.
         */
        static final String TV = "Meeting Room TV";

        /**
         * Full name for sound box device.
         */
        static final String SOUNDBOX = "Sound Box";

        /**
         * Full name for air conditioner device.
         */
        static final String AIRCON = "Air Conditioner";

        /**
         * Full name for touch pad device.
         */
        static final String TOUCHPAD = "Touch Pad";
    }

    class DeviceType {
        private DeviceType() {
        }

        /**
         * Device type string for light device.
         */
        public static final String LIGHT = "Light";

        /**
         * Device type string for TV device.
         */
        public static final String TV = "TV";

        /**
         * Device type string for sound box device.
         */
        public static final String SOUNDBOX = "SoundBox";

        /**
         * Device type string for air conditioner device.
         */
        public static final String AIRCON = "AirCon";

        /**
         * Device type string for touch pad device.
         */
        public static final String TOUCHPAD = "TouchPad";
    }

    class DeviceStatus {
        private DeviceStatus() {
        }

        /**
         * device status "On".
         */
        public static final String ON = "on";

        /**
         * device status "Off".
         */
        public static final String OFF = "off";

        /**
         * device status "tv_nofity", used for TV when notifying time.
         */
        public static final String TV_NOTIFY = "tv_notify";
    }

    class Topic {
        private Topic() {
        }

        /**
         * The name for Register topic.
         */
        public static final String REGISTER = "Register";

        /**
         * The name for AssignRoom topic.
         */
        public static final String ASSIGN_ROOM = "AssignRoom";

        public static String roomTouchPad(final String roomId) {
            return roomId + "_touch_pad";
        }

        public static String roomFeedback(final String roomId) {
            return roomId + "_feedback";
        }

        public static String roomTouchPadFb(final String roomId) {
            return roomId + "_touch_pad_fb";
        }
    }

    class Qos {
        private Qos() {
        }

        /**
         * Quality of Service level is 2.
         */
        public static final int QOS2 = 2;
    }
}
